package com.hly.product.dao;

import com.hly.product.entity.SpuInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * spu信息
 * 
 * @author dudulu
 * @email 52039@Miku.com
 * @date 2021-03-27 12:08:09
 */
@Mapper
@Repository
public interface SpuInfoDao extends BaseMapper<SpuInfoEntity> {

    @Select("select DISTINCT catalog_id from pms_spu_info")
    @Results(value = {
            @Result(id=true,property = "id" ,column = "id"),
            @Result(property = "spuName",column = "spu_name")
    })
    List<SpuInfoEntity> getCatalogId();
}
